import React from 'react';
import {
  Form,
  Modal,
} from 'antd';
import '../UserManage.less'
import DescriptionList from '@/components/DescriptionList';

const { Description } = DescriptionList;

// 查看详情
const DescView = Form.create()(props => {
  const { lookDescView, handleLookDesc, selectedRows } = props;
  console.log(selectedRows);
  const status = (status) => {
    let str = '';
    if (status === 1) {
      str = '启用';
    } else {
      str = status === 2 ? '停止' : '删除';
    }
    return str;
  };
  return (
    <Modal
      width={640}

      destroyOnClose
      title="查看详情"
      visible={lookDescView}
      onOk={() => handleLookDesc(false, [])}
      onCancel={() => handleLookDesc(false, [])}>
      <DescriptionList size="large" style={{ marginBottom: 32 }} col="1">
        {/*<Description term="银行ICON">*/}
          {/*<a href={selectedRows.icon} className={'icon-img'}>*/}
            {/*<img src={selectedRows.icon} className={'icon-img'} alt=""/>*/}
          {/*</a>*/}
        {/*</Description>*/}
        <Description term="银行中文全称">{selectedRows.bankName}</Description>
        <Description term="限额编号">{selectedRows.bankNo}</Description>
        <Description term="英文缩写">{selectedRows.bankEngName}</Description>
        <Description term="状态">{status(selectedRows.status)}</Description>
        <Description term="创建人">{selectedRows.createName}</Description>
        <Description term="创建时间">{selectedRows.createTime}</Description>
        <Description term="限额描述">{selectedRows.remark}</Description>

      </DescriptionList>
    </Modal>
  );
});

export default DescView;
